# @Version        : 1.0
# @Update Time    : 2024/6/18 22:09
# @File           : system_schema.py
# @IDE            : PyCharm
# @Desc           : 文件描述信息
from pydantic import Field
from typing_extensions import Self
from src.core.base import BaseSchema
from src.common.enum import StrEnum
from src.core.exception import BaseAppException


# 登录类型enum
class LoginType(StrEnum):
    username_password = "1"
    phone_password = "2"
    phone_code = "3"
    email_password = "4"
    email_code = "5"


class LoginParams(BaseSchema):
    method: LoginType = Field(..., description="登录方式")
    username: str = Field(..., description="用户名")
    password: str = Field(..., description="密码")
    code: str = Field(..., description="验证码")
    # 验证码id
    uuid: str = Field(..., description="验证码id")
    # 设备类型
    device_type: str = Field("PC", description="设备类型")
